﻿@inherits ChangePasswordByEmailBase

<BCard EnableAlwaysRender="true">

    <Body>
        @if (NewPasswordFormShow)
        {
            <BForm @ref="resetPasswordForm" LabelAlign="@LabelAlign.Right" Inline="false" EnableAlwaysRender="true" Style="width: 350px;">
                <BFormItem TValue="string" Label="新密码：" Name="@nameof(PasswordModel.Password)" IsRequired="true">
                    <BInput TValue="string" PrefixIcon="el-icon-lock" SuffixIcon="el-icon-view" Type="@InputType.Password" Placeholder="请输入密码" Style="width:250px;"></BInput>
                </BFormItem>
                <BFormItem TValue="string" Label="确认密码：" Name="@nameof(PasswordModel.ConfirmPassword)" IsRequired="true">
                    <BInput TValue="string" PrefixIcon="el-icon-lock" SuffixIcon="el-icon-view" Type="@InputType.Password" Placeholder="请输入确认密码" Style="width:250px;"></BInput>
                </BFormItem>
                <BFormActionItem Style=" text-align: right; ">
                    <BButton Type="@ButtonType.Default" IsPlain="true" OnClick="e=>ReSetPassword()" Style="width:100%;padding-left:10px;padding-right:10px;">确  认</BButton>
                </BFormActionItem>
            </BForm>
        }
        else
        {
            <BForm @ref="form" LabelAlign="@LabelAlign.Right" Inline="false" EnableAlwaysRender="true">
                <BFormItem TValue="string" Label="邮箱：" Name="@nameof(PasswordModel.Email)" IsRequired="true" EnableAlwaysRender="true">
                    <div class="content-flex-row">
                        <BInput TValue="string" Type="@InputType.Text" Placeholder="请输入您绑定的邮箱" Style="width:300px;" IsDisabled="btnInputDisabled" EnableAlwaysRender="true"></BInput>
                        <BButton Style="margin-left:20px;" Type="ButtonType.Default" IsPlain="true" OnClick="e => SendEmail()" IsDisabled="btnInputDisabled" EnableAlwaysRender="true">@BtnText</BButton>
                    </div>
                </BFormItem>
                <BFormItem TValue="string" Label="验证码：" Name="@nameof(PasswordModel.Code)" IsRequired="false">
                    <div class="content-flex-row">
                        <BInput TValue="string" Type="@InputType.Text" Placeholder="请输入验证码" Style="width:300px;"></BInput>
                        <BButton Style=" margin-left: 20px;" Type="ButtonType.Default" IsPlain="true" OnClick="e=>CheckAndNavigatToReset()">确定</BButton>
                    </div>
                </BFormItem>
            </BForm>
        }
    </Body>
</BCard>